feat: Telegram digest bot + event-detail improvements + VS Code launch - #1
Open
ukurere wants to merge 17 commits into
Open
feat: Telegram digest bot + event-detail improvements + VS Code launch#1ukurere wants to merge 17 commits into
ukurere wants to merge 17 commits into
Conversation
- Add contentHtml? field to EventItem model - Render RSS full-text via DomSanitizer.bypassSecurityTrustHtml() - Save and calendar toggle buttons on detail page (top + bottom bars) - Load initial saved/calendar state from UsersService on init - Full SCSS overhaul: article-body styles for images, headings, blockquotes, tables, code blocks, links; active-state colours for toggle buttons Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- Add TelegramUsername / TelegramChatId / TelegramNotificationsEnabled to User
- EF migration AddTelegramFields
- ITelegramBotService + TelegramBotService (Telegram.Bot 22.x, HTML mode, auto-split >4000 chars)
- NullTelegramBotService stub when BotToken not configured
- TelegramBotBackgroundService: long polling, /start links account by username,
/digest sends on-demand digest
- DigestService: send Telegram message alongside email when enabled
- UsersController: PATCH /{id}/telegram endpoint, telegram fields in MapUser
Frontend:
- User model: telegramNotificationsEnabled / telegramUsername / telegramChatId
- UsersService: updateTelegram() PATCH call
- Profile: mat-slide-toggle, @username input, connection status indicator,
saveTelegram() method; MatSlideToggleModule added to imports
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
F5 (or Run > Start Debugging > 🚀 Full Stack) now: - builds the .NET backend and attaches the coreclr debugger - starts ng serve in a dedicated terminal and opens Chrome at localhost:4200 Both processes stop together when debugging ends (stopAll: true) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
launch.json: replaced compound+chrome with single coreclr launch; serverReadyAction opens localhost:4200 when .NET starts listening; preLaunchTask now builds .NET first, then waits for Angular tasks.json: serve: frontend depends on build: backend (sequential); simplified background pattern matchers for Angular 20 Vite output RssFeedService: use GetAsync to check HTTP status before parsing; skip sources returning HTML (instead of crashing); add CheckCharacters=false to XmlReaderSettings to tolerate invalid chars like 0x02; catch XmlException gracefully with a warning log instead of propagating the error DbSeeder: remove 6 broken sources (LIGA.net 404, AIN.EN bad XML, Harvard/Afisha HTML, Kingston/Stanford 404); add Reuters, AIN.UA, Hacker News as reliable replacements Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AdminOnly policy on AdminController (adamyocardium@gmail.com only) - Angular adminGuard blocks /admin for non-admin users - UserKeywords model, migration, API endpoints and frontend UI - DigestService includes personal keywords in filtering - Send now buttons (email + telegram) in profile - Calendar tab label changed to Vidmicheni materialy Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added SendNowAsync method with fixed 30-day range - Controller returns 400 with clear message if no matching events found - Telegram send-now uses same logic via telegramOnly flag Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three features developed in this session, building on top of the earlier admin page, RSS polling, profile tabs, and event-card toggle work:
DomSanitizer, functional ★ Save and 📅 Calendar toggle buttons (top + bottom bars), complete SCSS overhaul for article body (images, headings, blockquotes, code blocks, links, tables)@usernamein the profile, send/startto the bot, and the bot links the account automatically; digests are sent in parallel to email + Telegram;/digestcommand on demand;NullTelegramBotServicestub when token is not configured.vscode/launch.jsoncompound config (🚀 Full Stack) builds the .NET backend with debugger + startsng servein a dedicated terminal and opens Chrome, all with a single F5Changes
Backend
Usermodel:TelegramUsername,TelegramChatId(long?),TelegramNotificationsEnabledAddTelegramFieldsITelegramBotService/TelegramBotService(Telegram.Bot 22.x, HTML parse mode, auto-split at 4 000 chars)NullTelegramBotService— no-op whenTelegram:BotTokenis not configuredTelegramBotBackgroundService— long polling;/startlinks account by username;/digestsends on-demandDigestService.SendDigestAsync— sends Telegram message alongside email when enabledDigestService.SendTelegramDigestAsync— Telegram-only path used by/digestcommandUsersController—PATCH /{id}/telegramendpoint; telegram fields exposed inMapUserappsettings.example.json—Telegram:BotTokenplaceholder addedFrontend
Usermodel —telegramNotificationsEnabled,telegramUsername,telegramChatIdUsersService.updateTelegram()—PATCHcallmat-slide-toggleto enable/disable,@usernameinput, connection status chip (✅ connected / ⏳ waiting for /start),saveTelegram()method;MatSlideToggleModuleadded[innerHTML]="safeContent()", toggle buttons, full SCSS for article bodyEventItem.contentHtml?field added to modelDev tooling
.vscode/tasks.json—build: backend(dotnet build) +serve: frontend(ng serve, background with pattern matcher).vscode/launch.json— compound🚀 Full Stack(coreclr + chrome),stopAll: trueTest plan
appsettings.json, run backend/startto bot in Telegram → status changes to "✅ Connected"/digestto bot → receives personalized digest🤖 Generated with Claude Code